package com.nexgo.payment;

import android.app.Application;
import android.content.Context;

import com.nexgo.executor.JobExecutor;
import com.nexgo.payment.api.ApiCrashHandler;
import com.nexgo.payment.databases.Repository;
import com.nexgo.payment.util.ToastUtils;
import com.nexgo.payment.util.UIUtils;

import java.util.concurrent.Executor;

/**
 * Created by xiaox on 2016/11/29.
 */

public class App extends Application {
    public static Context sContext;
    public static Executor sExecutor;

    @Override
    public void onCreate() {
        super.onCreate();
        sContext = this;
        sExecutor = new JobExecutor();
//        LogUtils.setDebugEnable(true);
        ToastUtils.init(this);
        // FIXME: 2017/12/21 发布版本打开捕捉全局异常
        ApiCrashHandler.getInstance().init(this);
        Repository.getInstance().init(this);
        UIUtils.setProperty("sys.xgd.swipe.disable","false");
        UIUtils.setProperty("sys.xgd.home.disable","true");
        UIUtils.setProperty("sys.xgd.appswitch.disable","true");
    }
}
